package com.treasure.mall.biz.repository.marketing;

import com.treasure.mall.biz.entity.marketing.RedPacketGrabLogPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/8/1
 */
@Repository
public interface RedPacketGrabLogRepository extends JpaRepository<RedPacketGrabLogPO, Long> {
    boolean existsByRedPacketIdAndUserPO_UserId(Long redPacketId, Long userId);

    List<RedPacketGrabLogPO> findByRedPacketId(Long redPacketId);
}
